package com.vast.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.vast.system.entity.SuperEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@ApiModel(value="com.vast.admin.entity.LogAnn")
@Data
@TableName(value = "sys_log")
public class SysLog extends SuperEntity implements Serializable {
    /**
     * 用户名
     */
    @TableField(value = "username")
    @ApiModelProperty(value="用户名")
    private String username;

    /**
     * 操作
     */
    @TableField(value = "operation")
    @ApiModelProperty(value="操作")
    private String operation;

    /**
     * 操作
     */
    @TableField(value = "type")
    @ApiModelProperty(value="类型 1-登录 2-操作")
    private int type;

    /**
     * 状态
     */
    @TableField(value = "status")
    @ApiModelProperty(value="状态 1-成功 0- 失败, 2- 限制登录")
    private int status;

    /**
     * 请求方式
     */
    @TableField(value = "method")
    @ApiModelProperty(value="请求方式")
    private String method;

    /**
     * 参数
     */
    @TableField(value = "params")
    @ApiModelProperty(value="参数")
    private String paramsStr;

    /**
     * url地址
     */
    @TableField(value = "url")
    @ApiModelProperty(value="请求地址")
    private String url;

    /**
     * ip地址
     */
    @TableField(value = "ip")
    @ApiModelProperty(value="ip地址")
    private String ip;

    private static final long serialVersionUID = 1L;

    public static final String COL_TYPE = "type";

    public static final String COL_USERNAME = "username";

    public static final String COL_OPERATION = "operation";

    public static final String COL_METHOD = "method";

    public static final String COL_PARAMS = "params";

    public static final String COL_IP = "ip";

    public static final String COL_URL = "url";
}